<?php

/**
 * @name: HOTN AnimeList
 * @author: HammerOnTheNail
 * @link: http://code.google.com/p/hotnanimelist/
 */

// Admin oldal címének meghatározása
$title .= " \ ".HOTN_ANIMELIST_ADMIN_MENU_PROJECT_CREATE;
$text = "";

// POST
	if ($_POST['action'] == "new")
	{
		$values = $HOTN_ANIMELIST_ADMIN_PROJECT->hotn_animelist_admin_project_save("new",$_POST);
		if ($values === TRUE)
		{
			$ns -> tablerender(HOTN_ANIMELIST_ADMIN_DEFAULT_ERROR_TITLE, HOTN_ANIMELIST_ADMIN_PROJECT_SAVE);
		}
	}


// Adatok

	// Munkatársak
	$sql->db_Select("hotn_animelist_team, ".MPREFIX."user", "user_id, user_name", "user_id = team_id");
	while ($row = $sql->db_Fetch())
	{
		$values['project_users_value'][$row['user_id']] = $row['user_name'];
	}
	
	// Alap adatok
	$values['action'] = e_SELF."?project.create";
	$values['hidden'] = array("action" => "new");
	$values['project_submit'] = HOTN_ANIMELIST_ADMIN_PROJECT_SUBMIT_SAVE;
	$values['project_files_show'] = FALSE;
	
	include(e_PLUGIN."hotn_animelist/Admin/project/project.php");

// Admin oldal tartalmának megjelenítése
$text .= "<div style='text-align: center;'>".$HOTN_ANIMELIST_FORM->show_form($data)."</div>";
?>